import Home from '@/views/home'
import Tabbar from '@/components/tabbar'
import login from '@/views/login'
import News from '@/views/news'
import Mine from '@/views/mine'

const routes = [
  {
    path: '/',
    redirect: '/home', // 重定项 让网页打开默认是home页面
  },
  {
    path: '/home',
    name: 'Home',
    components: {
      default: Home,
      footer: Tabbar,
    },
    meta: {
      title: '首页',
      icon: '&#xe750;',
      inTabbar: true, // 是否包含在tabbar中
    },
  },
  {
    path: '/news',
    name: 'News',
    components: {
      default: News,
      footer: Tabbar,
    },
    meta: {
      title: '消息',
      icon: '&#xe691;',
      inTabbar: true, // 是否包含在tabbar中
    },
  },
  {
    path: '/login',
    name: 'Login',
    components: {
      default: login,
    },
  },
  {
    path: '/mine',
    name: 'Mine',
    components: {
      default: Mine,
      footer: Tabbar,
    },
    meta: {
      title: '我的',
      icon: '&#xe608;',
      inTabbar: true, // 是否包含在tabbar中
    },
  },
]

export default routes
